package com.qk.management.mapper;

import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author ZLJ
 * @date 2025/10/9 14:47
 * @Description
 */
@Mapper
@SuppressWarnings("all")
public interface ActivityMapper {

    @Select("select * from activity where type= #{type}")
    List<Activity> getByType(Integer type);

    @Select("select * from activity where id= #{id}")
    Activity getById(Integer id);

    void update(Activity activity);

    void insert(Activity activity);

    @Delete("delete from activity where id= #{id}")
    void deleteById(Integer id);

    Integer count(Integer channel, Integer type, Integer status);

    List<Activity> selectByPage(Integer channel, Integer type, Integer status, Integer offset, Integer pageSize);
}
